<div class="row" style="height:100%;">
	<div class="col-lg-12" style="border-right:1px solid #e6e6e6;padding-right:0px;">
		<h1 class="site-h1" style="background-color:#FFFFFF;">
			联系人
				<span style="float:right;">
					<#if (user?? && user.superuser) || (user?? && (user.roleAuthMap["A02_A01_A02_B14"]?? || user.usertype == "0")) >
					<button class="layui-btn layui-btn-sm green" href="/apps/contacts/item/add.html?addtype=type" data-toggle="ajax" data-height="360" data-width="550" data-title="新建分类">
						新建分类
					</button>
					</#if>
					<#if (user?? && user.superuser) || (user?? && (user.roleAuthMap["A02_A01_A02_B15"]?? || user.usertype == "0")) >
					<button class="layui-btn layui-btn-sm green" href="/apps/contacts/item/add.html?addtype=item" data-toggle="ajax" data-height="360" data-width="550" data-title="新建项目">
						新建项目
					</button>
					</#if>
				</span>
		</h1>
		<div class="ukefu-scroll" style="overflow: hidden; outline: none;">
			<ul class="ukefu-contacts-menu">
				<li class="menu-dropdown">
					<a class="menu-dropdown-a" href="javascript:void(0);"> 
						<i class="layui-icon "></i> 
						<span class="text">公共联系人</span>
					</a>
					<i class="layui-icon " style="float:right;text-indent: 2em;"></i> 
					<div class="list page-list" <#if !ckind??> style="display: none;"</#if>>
						<div class="list-con crm-clearfix">
							<ul class="list-menu">
								<#if user?? && (user.roleAuthMap["A02_A01_A01"]?? || user.usertype == "0") >
									<li>
										<a <#if !ckind?? && !itemid??>class="cur"</#if> href="/apps/contacts/index.html?contactstype=index" style="text-indent: 2em;">
											<i class="layui-icon"></i> 
											<span class="text">全部联系人</span>
										</a>
									</li>
								</#if>
								<#if user?? && (user.roleAuthMap["A02_A01_A02"]?? || user.usertype == "0") >
								<#if uKeFuDic['com.dic.contacts.ckind']??>
								<#list uKeFuDic['com.dic.contacts.ckind'] as dic>
									<li>
										<a <#if ckind?? && ckind==dic.id>class="cur"</#if>  href="/apps/contacts/index.html?ckind=${dic.id!''}&contactstype=index" style="text-indent: 2em;">
											<i class="layui-icon">&#xe770;</i> 
											<span class="text">${dic.name!''}</span>
										</a>
									</li>
								</#list>
								</#if>
								</#if>
							</ul>
						</div>
					</div>
				</li>
			
				
				<#if contactsItemList?? && contactsItemList?size gt 0>
					<#list contactsItemList as contactsItem>
						<#if contactsItem.itemid?? && contactsItem.itemid==contactsItem.id>
							<li class="menu-dropdown">
								<a class="menu-dropdown-a" href="javascript:void(0)"> 
									<i class="layui-icon ">&#xe613;</i> 
									<span class="text">${contactsItem.name!''}</span>
								</a>
								<#assign icon=false>
								<#list contactsItemList as item2>
									<#if item2.parentid?? && item2.parentid==contactsItem.id>
									<#assign icon=true>
									<i class="layui-icon <#list contactsItemList as item2><#if item2.parentid?? && item2.parentid==contactsItem.id>menu-dropdown-a</#if><#break></#list>" style="float:right;text-indent: 2em;">&#xe602;</i> 
									<div class="list page-list" style="">
										<div class="list-con crm-clearfix">
											<ul class="list-menu">
												<#list contactsItemList as itemtype>
													<#if itemtype.parentid?? && itemtype.parentid==contactsItem.id>
														<li>
														<a <#if itemid?? && itemid==itemtype.id>class="cur"</#if>  href="/apps/contacts/index.html?itemid=${itemtype.id!''}&contactstype=index" style="text-indent: 2em;">
															<i class="layui-icon">&#xe770;</i> 
															<span class="text">${itemtype.name!''}</span>
														</a>
														</li>
													</#if>
												</#list>
											</ul>
										</div>
									</div>
									<#break>
									</#if>
								</#list>
								<#if icon?? && icon==false><i class="layui-icon " style="float:right;font-size:20px;color: red;cursor: pointer;" onclick="top.layer.confirm('请确认是否删除该分类或项目？', {icon: 3, title:'提示'}, function(index){top.layer.close(index);if(confirm){location.href = '/apps/contacts/item/delete.html?itemid=${contactsItem.id!''}' ;}});">&#xe640;</i></#if>
							</li>
						</#if>
					</#list>
				</#if>
			</ul>
		</div>
	</div>
</div>